<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<div id="order_set_layout" class="easyui-layout" data-options="fit:true,split:false">   
	<div id="re_order" class="easyui-panel" title="最新物流订单通告"     
        style="height:300px;padding:10px;background:#fafafa;"   
        data-options="iconCls:'icon-lorry',closable:true,    
                collapsible:true">   
  	  	<div>发布日期：</div><br/>
  	  	<span></span>
	</div>  
	<div id="re_handle" class="easyui-panel" title="最新处理问题通告"     
        style="height:250px;padding:10px;background:#fafafa;"   
        data-options="iconCls:'icon-help',closable:true,    
                collapsible:true,fit:true">   
      	<div>发布日期：</div><br/>
      	<span></span>
	</div>  
</div>  
<script>
function refreshAnnoun(){
	$.ajax({
		url : "announce/getAllInfo.do",
		dataType : "json",
		success : function(data) {
			
			if(data[0]!=undefined && data[0].type==0){
				var myDate=new Date(data[0].edit_tm);
	    		var newDate = myDate.toLocaleDateString();//.replace(/(\d+)[^\d](\d+)[^\d](\d+)[^\d]/, "$1-$2-$3");
	    		$("#re_order div").empty();
	    		$("#re_order div").append(newDate);
	    		$("#re_order span").empty();
				$("#re_order span").append(data[0].content);
			}
			
			if(data[1]!=undefined && data[1].type==1){
				var myDate=new Date(data[1].edit_tm);
				var newDate = myDate.toLocaleDateString();//.replace(/(\d+)[^\d](\d+)[^\d](\d+)[^\d]/, "$1-$2-$3");
				$("#re_handle div").empty();
				$("#re_handle div").append(newDate)
				$("#re_handle span").empty();
				$("#re_handle span").append(data[1].content);
			}
		}
	})
	setTimeout("refreshAnnoun()",1000*60*2);  
}
	refreshAnnoun();
	
</script>
   